import request from '@/utils/request'
//获取活动列表
export function activityList(params) {
  return request({
    url:'/shop/discount/ActList',
    method:'get',
    params:params
  })
}


//获取参加活动选择的商品
export function activityGoodsList(params) {
  return request({
    url:'/shop/discount/ActStandbysGoods',
    method:'get',
    params:params
  })
}


//提交参加活动选择的商品
export function postActivityGoodsList(data) {
  return request({
    url:'/shop/discount/ActGoodsAdd',
    method:'post',
    data:data
  })
}



//获取参加活动的商品
export function getActivityGoodsList(params) {
  return request({
    url:'/shop/discount/ActGoods',
    method:'get',
    params:params
  })
}


//获取指定商品的sku
export function getActivityGoodsSku(params) {
  return request({
    url:'/shop/discount/ActGoodsSku',
    method:'get',
    params:params
  })
}

//批量设置商品折扣与限购
export function postSetGoodsPrice(data) {
  return request({
    url:'/shop/discount/batchPrice',
    method:'post',
    data:data
  })
}

//新增编辑活动
export function setdiscount(data) {
  return request({
    url:'/shop/discount/edit',
    method:'post',
    data:data
  })
}

//修改sku价格
export function GoodsDetailEdit(data) {
  return request({
    url:'/shop/discount/GoodsDetailEdit',
    method:'post',
    data:data
  })
}


//修改限购及排序
export function goodsEditSort(data) {
  return request({
    url:'/shop/discount/goodsEdit',
    method:'post',
    data:data
  })
}


//删除活动商品
export function goodsDel(data) {
  return request({
    url:'/shop/discount/goodsDel',
    method:'post',
    data:data
  })
}


//导入商品
export function goodsImport(data) {
  return request({
    url:'/shop/discount/goodsImport',
    method:'post',
    data:data
  })
}


//拉新活动列表
export function getLaxinList(params) {
  return request({
    url:'/shop/user/actList',
    method:'get',
    params:params
  })
}

//获取拉新活动详情
export function getLaxinInfo(params) {
  return request({
    url:'/shop/user/actDetail',
    method:'get',
    params:params
  })
}

//提交拉新活动
export function postLaxinInfo(data) {
  return request({
    url:'/shop/user/actEdit',
    method:'post',
    data:data
  })
}


//拉新活动订单列表
export function getLaxinOrderList(params) {
  return request({
    url:'/shop/actView/order',
    method:'get',
    params:params
  })
}


//参与人列表
export function getUserNumList(params) {
  return request({
    url:'/shop/actView/userNum',
    method:'get',
    params:params
  })
}

//拉新人数列表
export function getUserNewList(params) {
  return request({
    url:'/shop/actView/userNew',
    method:'get',
    params:params
  })
}


//某一位参与人的拉新人数列表
export function getbuyIdUserNewList(params) {
  return request({
    url:'/shop/actView/member',
    method:'get',
    params:params
  })
}



//拉新活动上下架
export function postActUp(data) {
  return request({
    url:'/shop/user/actUp',
    method:'post',
    data:data
  })
}


//拉新活动奖品发放
export function postActOrderDeliver(data) {
  return request({
    url:'/shop/user/actOrderDeliver',
    method:'post',
    data:data
  })
}


//导出订单
export function orderExcel(params) {
  return request({
    url:'/shop/actView/orderExcel',
    method:'get',
    params:params
  })
}



//获取主题活动品牌列表
export function ActBrandList(params) {
  return request({
    url:'/shop/discount/ActBrand',
    method:'get',
    params:params
  })
}

//提交主题活动品牌
export function postBrandEdit(data) {
  return request({
    url:'/shop/discount/BrandEdit ',
    method:'post',
    data:data
  })
}


//获取砍价商品列表
export function getBargainGgoodsList(params) {
  return request({
    url:'/shop/bargain/goods',
    method:'get',
    params:params
  })
}

//获取砍价商品详情
export function getBargainGgoodsDetail (params) {
  return request({
    url:'/shop/bargain/goodsDetail',
    method:'get',
    params:params
  })
}

//新增编辑砍价商品
export function saveBargainGoodsEdit (data) {
  return request({
    url:'/shop/bargain/goodsEdit',
    method:'post',
    data:data
  })
}


//获取砍价发起列表
export function getBargainSponsor (params) {
  return request({
    url:'/shop/bargain/sponsor',
    method:'get',
    params:params
  })
}


//获取砍价活动帮砍记录
export function gethelpBargain (params) {
  return request({
    url:'/shop/bargain/help',
    method:'get',
    params:params
  })
}

//获取砍价活动规则
export function getBargainRule (params) {
  return request({
    url:'/shop/bargain/rule',
    method:'get',
    params:params
  })
}

//编辑砍价活动规则
export function getBargainRuleEdit (data) {
  return request({
    url:'/shop/bargain/ruleEdit',
    method:'post',
    data:data
  })
}


//获取砍价活动待选商品
export function getBargainGoodsList (params) {
  return request({
    url:'/shop/bargain/standbyGoods',
    method:'get',
    params:params
  })
}

//设置砍价活动商品上下线
export function setBargainGoodsLine (data) {
  return request({
    url:'/shop/bargain/bargainUp',
    method:'post',
    data:data
  })
}

//砍价活动商品删除
export function delBargainGoods (data) {
  return request({
    url:'/shop/bargain/bargainDel',
    method:'post',
    data:data
  })
}
